home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ Language=VBScript CODEPAGE=65001 %> <!--#include file="wmsConstants.inc"--> <!--#include file="wmsLocStrings.inc"--> <!--#include file="wmsCommon.inc"--> <!--#include file="wmsHeader.inc"--> <!--#include file="wmsServerHash.inc"--> <!--#include file="wmsconnect.inc"--> <!--#include file="wmsError.inc"--> <% '+------------------------------------------------------------------------- ' ' Microsoft Windows Media ' Copyright (C) Microsoft Corporation. All rights reserved. ' ' File: Server_Stopped.asp ' ' Contents: Shown when there's a connection failure ' '-------------------------------------------------------------------------- Response.Clear on error resume next Dim dwConnectionFailureCode Dim bRedirectedFromConnectionFailure Dim bRedirectToAdmin Dim bShowTryAgain Dim dwTabIndex bShowTryAgain = true dwConnectionFailureCode = s_WMSAdmin.GetServiceStatus( g_strDecodedServerName ) dwTabIndex = 1 ' Connect to WMSASPAdmin.DLL -- the glue that connects to the Windows Media Server ' ' NOTE: If this fails, then the Windows Media Server's administration components ' have not been installed properly. This may be fixed by typing the following ' commands from the comand line: ' ' pushd %sytemroot%\system32\windows media\server\admin\asp\ ' regsvr32 wmsaspadmin.dll ' ' Should this fail, please re-install Windows Media Server from the Windows XP ' distribution CD. ' Set s_WMSAdmin = Session( "WMSAdmin" ) if( IsEmpty( s_WMSAdmin ) ) then Set s_WMSAdmin = Server.CreateObject("WMSAdminRemote.ASPAdmin") Set Session("WMSAdmin") = s_WMSAdmin end if if( IsEmpty( s_WMSAdmin ) ) then ' If this happens, check to ensure WMSASPADMIN.DLL is registered properly. if g_bDebugMode then STOP end if end if bRedirectedFromConnectionFailure = Session( "ConnectionFailure" ) bRedirectToAdmin = FALSE if( 0 = Len( g_strDecodedServerName ) ) then g_strDecodedServerName = ServerHashKeyToName( g_strQueryStringServer ) end if if( ( 0 < Len( qs( "stopping" ) ) ) and ( WMS_SERVER_UNKNOWN = dwConnectionFailureCode ) ) then dwConnectionFailureCode = WMS_SERVICE_STOPPED ' Response.Redirect( "server_stopped.asp?server=" & g_strQueryStringServer ) end if if( ( FALSE = bRedirectedFromConnectionFailure ) and ( WMS_SERVICE_STARTED = dwConnectionFailureCode ) ) then ConnectToServer() if( empty <> g_objServer ) then bRedirectToAdmin = TRUE end if else if( ( FALSE = bRedirectedFromConnectionFailure ) and ( 0 = StrComp( g_strQueryStringServerOp, "connect", vbTextCompare ) ) ) then ConnectToServer() if( empty <> g_objServer ) then bRedirectToAdmin = TRUE end if end if end if Dim strTitleString Select Case( dwConnectionFailureCode ) case WMS_SERVICE_STOPPED strTitleString = L_SERVERSTOPPED_TEXT case WMS_HOST_UNAVAILABLE strTitleString = L_CANNOTCONNECTTOWMSERROR1_TEXT case WMS_SERVICE_UNAVAILABLE strTitleString = WMS_SERVICE_UNAVAILABLE case else if( IsEmpty( g_objServer ) ) then strTitleString = WMS_SERVICE_UNAVAILABLE else strTitleString = L_CONNECTIONFAILURE_TEXT end if End Select WriteHTMLHeader( RemoveDangerousCharacters( strTitleString ) ) %> <script language="JavaScript" src="/wmssecure/include/WMSCommon.js"></script> <link rel="stylesheet" type="text/css" href="/wmssecure/<%= Session( "cssName" ) %>"> <script language="JavaScript"> <!-- /*@cc_on @*/ //////////////////////////////////////////////////////////////////////////////////////////////////// function RedirectToAdmin() { <% jsTRY %> window.parent.parent.document.location.replace( "/wmssecure/admin.asp?server=<%= g_strQueryStringServer %>" ); <% jsCATCH %> } /////////////////////////////////////////////////////// function OnLogOffClicked() { <% jsTry %> var winServerList = null; var szFeatures = ""; winServerList = window.open( "", "sList", szFeatures, true ); if( winServerList ) { var szwinLoc = new String( winServerList.location ); if( 0 < szwinLoc.length ) { winServerList.location.replace( document.location.protocol + "//" + document.location.hostname + ":" + document.location.port + "/WMSLogOff.asp?terminate=1" ); } } var winHelp = window.open( "", "HELP", szFeatures, true ); window.focus(); if( winHelp ) { winHelp.close(); } window.focus(); window.parent.parent.location.replace( document.location.protocol + "//" + document.location.hostname + ":" + document.location.port + "/WMSLogOff.asp?terminate=1&close=1" ); <% jsCATCH %> } /////////////////////////////////////////////////////// function OpenServerList() { <% jsTRY %> var win = null; var szFeatures = "location,menubar,resizable,scrollbars,status,toolbar"; var szWinName = "sList"; win = window.open( parent.document.location.protocol + "//" + parent.document.location.host + "/wmssecure/index.asp", szWinName, szFeatures, true ); if( ! win ) { win = window.open( parent.document.location.protocol + "//" + parent.document.location.host + "/wmssecure/index.asp", szWinName, szFeatures, true ); } else { win.focus(); } win.location.reload(); <% jsCATCH %> } //////////////////////////////////////////////////////////////////////////////////////////////////// function Reconnect( bStartService ) { <% jsTRY %> var szOp; if( bStartService ) { szOp = "start"; } else { szOp = ""; } // // Taking care to remove any previous serverop arg from the query string... // window.parent.parent.document.location.replace( window.parent.parent.document.location.protocol + "//" + window.parent.parent.document.location.host + "/wmssecure/admin.asp?server=<%= g_strQueryStringServer %>&serverop=" + szOp + "&failCode=<%= dwConnectionFailureCode %>" ); <% jsCATCH %> } //////////////////////////////////////////////////////////////////////////////////////////////////// function UseSingleFrame() { <% jsTRY %> <% if( brMSIE <> g_dwBrowserType ) then %> if( parent.document.location != document.location ) { parent.document.location.replace( parent.document.location.protocol + "//" + parent.document.location.host + "/wmssecure/include/server_stopped.asp?server=<%= g_strQueryStringServer %>&serverop=" ); <% else %> if( window.parent != window ) { document.parentWindow.parent.parent.location.replace( document.parentWindow.parent.parent.location.protocol + "//" + document.parentWindow.parent.parent.location.host + "/wmssecure/include/server_stopped.asp?server=<%= g_strQueryStringServer %>&serverop=" );<% end if %> } <% jsCATCH %> return; } //////////////////////////////////////////////////////////////////////////////////////////////////// function ReloadTopDocument() { <% jsTRY %> <% if( brMSIE = g_dwBrowserType ) then %> window.parent.location = window.parent.location; <% else %> parent.document.location = parent.document.location; <% end if %> <% jsCATCH %> } //////////////////////////////////////////////////////////////////////////////////////////////////// function SleepAndTryAgain() { <% jsTRY %> <% if WMS_SERVICE_INERROR = dwConnectionFailureCode then %> setTimeout( "Reconnect( true );", 20000, "JavaScript" ); <% else %> setTimeout( "Reconnect( false );", 20000, "JavaScript" ); <% end if %> <% jsCATCH %> } --> </script><% Dim dwTimeout if WMS_SERVICE_STARTING = dwConnectionFailureCode then dwTimeout = 3 else dwTimeout = 30 end if %> <meta HTTP-EQUIV="refresh" content="<%= dwTimeout %>;url=<%= Request.ServerVariables("url") & "?" & Request.QueryString %>"/> </head> <body bgcolor="white" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" onload="JavaScript:<% if bRedirectToAdmin then %>RedirectToAdmin();<% end if %>UseSingleFrame();<% if FALSE = bRedirectedFromConnectionFailure then %>SleepAndTryAgain();<% end if %>"><table width="100%" bgcolor="white" cellspacing="5" border="0"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td> </td> <td width="110" height="101" valign="middle"> <img src="/wmssecure/img/winmedia.gif" width="121" height="111" border="0"> </td> <td align="left" valign="middle"> <br> <div class="servername"> <% ConnectToServer if( bRedirectToAdmin ) then Response.Write( Server.HTMLEncode( L_SERVICESTARTING_TEXT ) ) elseif( WMS_SERVICE_STOPPED = dwConnectionFailureCode ) then Response.Write( Server.HTMLEncode( L_SERVERSTOPPED_TEXT ) ) elseif( WMS_SERVICE_STARTING = dwConnectionFailureCode ) then Response.Write( Server.HTMLEncode( L_SERVICESTARTING_TEXT ) ) elseif( WMS_HOST_UNAVAILABLE = dwConnectionFailureCode ) then Response.Write( Server.HTMLEncode( L_CANNOTCONNECTTOWMSERROR1_TEXT ) ) elseif( IsEmpty( g_objServer ) or ( WMS_SERVICE_UNAVAILABLE = dwConnectionFailureCode ) ) then dwConnectionFailureCode = WMS_SERVICE_UNAVAILABLE Response.Write( Server.HTMLEncode( L_SERVICEUNAVAILABLE_TEXT ) ) end if %> </div> </td> <td> </td> </tr> <tr> <td> </td> <td colspan="3"> <p><% if( 0 < Len( g_strDecodedServerName ) ) then %> <div class="stopped"> <%= Server.HTMLEncode( L_ATTEMPTEDTOCONNECTTO_TEXT ) & " " %><font color="yellow"><%= Server.HTMLEncode( SafeUnescape( g_strDecodedServerName ) ) %></font></div> <% if( WMS_SERVICE_STARTING <> dwConnectionFailureCode ) and _ ( WMS_SERVICE_STARTED <> dwConnectionFailureCode ) and _ ( FALSE = bRedirectToAdmin ) then %> <p> <div class="helptext"><% if WMS_SERVICE_STOPPED = dwConnectionFailureCode then Response.Write( Server.HTMLEncode( L_SERVICESTOPPED_TEXT ) ) elseif WMS_HOST_UNAVAILABLE = dwConnectionFailureCode then Response.Write( Server.HTMLEncode( L_MACHINEUNREACHABLE_TEXT ) ) elseif WMS_SERVICE_UNAVAILABLE = dwConnectionFailureCode then Response.Write( Server.HTMLEncode( L_SERVICENOTAVAILABLE_TEXT ) ) if TRUE = Session( "Initialized" ) then if( ( null = g_objDictionary ) or IsEmpty( g_objDictionary ) ) then bShowTryAgain = false else if( null <> g_objDictionary.Exists( g_strQueryStringServer ) ) then bShowTryAgain = true end if end if end if elseif WMS_SERVICE_INERROR = dwConnectionFailureCode then Response.Write( Server.HTMLEncode( L_SERVICEERROR_TEXT ) ) else Response.Write( Server.HTMLEncode( L_CANNOTCONNECTTOWMS_TEXT ) & "<l>" ) Response.Write( "<li>" & Server.HTMLEncode( L_CANNOTCONNECTLI1_TEXT ) & "</li>" ) Response.Write( "<li>" & Server.HTMLEncode( L_CANNOTCONNECTLI2_TEXT ) & "</li>" ) Response.Write( "<li>" & Server.HTMLEncode( L_CANNOTCONNECTLI3_TEXT ) & "</li></l>" ) end if %> </div><% elseif( FALSE = Session( "Initialized" ) ) then %> <div class="stopped"> <%= Server.HTMLEncode( L_SESSIONEXPIRED_TEXT ) & " " %></div> <script language="JavaScript"> <!-- function HandleSessionExpiration() { window.parent.parent.location = document.location.protocol + "//" + document.location.hostname + ":" + document.location.port + "/WMSLogOff.asp"; return; <% if IsEmpty( Session( "bAlertedToSessionEnd" ) ) then Session( "bAlertedToSessionEnd" ) = TRUE %> window.alert( "<%= RemoveDangerousCharacters( L_SESSIONEXPIRED_TEXT ) %>" ); <% end if if( brMSIE = g_dwBrowserType ) then %> window.parent.parent.document.location = window.parent.parent.document.location.protocol + "//" + window.parent.parent.document.location.host; <% else %> parent.document.location = parent.document.location.protocol + "//" + parent.document.location.host; <% end if %> } HandleSessionExpiration(); --> </script> <% end if end if %> </td> </tr> <tr> <td> </td> <td colspan="2"> <br> <img src="/wmssecure/img/WMSSpacer.gif" width="2" height="14"> </td> </tr> <tr> <td> </td> <td align="left" colspan="2"> <form id="form1" name="form1"><% if TRUE = Session( "Initialized" ) then if ( 0 = strcomp( "kill", g_strQueryStringServerOp, vbTextCompare ) ) then %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_RESTARTSERVICEBUTTON_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_RESTARTSERVICEBUTTON_TEXT ) %>" onclick="Javascript:Reconnect( true );this.disabled=true;"> <% elseif WMS_SERVICE_STOPPED = dwConnectionFailureCode then %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_STARTSERVICEBUTTON_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_STARTSERVICEBUTTON_TEXT ) %>" onclick="Javascript:Reconnect( true );this.disabled=true;"> <% elseif ( WMS_SERVICE_STARTED = dwConnectionFailureCode ) or _ ( WMS_SERVICE_STARTING = dwConnectionFailureCode ) then %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_STARTSERVICEBUTTON_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_STARTSERVICEBUTTON_TEXT ) %>" onclick="Javascript:Reconnect( true );this.disabled=true;" disabled> <% elseif WMS_SERVICE_INERROR = dwConnectionFailureCode then %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_TRYAGAINBUTTON_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_TRYAGAINBUTTON_TEXT ) %>" onclick="Javascript:Reconnect( true );this.disabled=true;"> <% elseif WMS_SERVICE_FAILEDTOSTART = dwConnectionFailureCode then %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_STARTSERVICEBUTTON_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_STARTSERVICEBUTTON_TEXT ) %>" onclick="Javascript:Reconnect( true );this.disabled=true;"> <% elseif ( TRUE = bShowTryAgain ) then %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_TRYAGAINBUTTON_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_TRYAGAINBUTTON_TEXT ) %>" onclick="Javascript:Reconnect( false );this.disabled=true;"> <% end if if ( TRUE = Session( "ShowServerList" ) ) then %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_RETURNTOSLISTBUTTON_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_RETURNTOSLISTBUTTON_TEXT ) %>" onclick="JavaScript:OpenServerList();" ID="Button2"> <% else %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_CLOSEBUTTONSPACED_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_CLOSEBUTTONSPACED_TEXT ) %>" onclick="Javascript:if( window.parent ) { window.parent.close(); } else window.close();this.disabled=true;" ID="Button1"> <% end if %> <input type="button" align="baseline" name="<%= Server.HTMLEncode( L_LOGOFFBTN_TEXT ) %>" tabIndex=<%= dwTabIndex %> <% dwTabIndex = dwTabIndex + 1 %> value="<%= Server.HTMLEncode( L_LOGOFFBTN_TEXT ) %>" onclick="Javascript:OnLogOffClicked();this.disabled=true;"> <% end if %> </form> </td> </tr> </table> </body> <% if ( FALSE = bRedirectedFromConnectionFailure ) and ( 0 = Len( qs("failCode") ) ) then if( WMS_SERVICE_STARTED = dwConnectionFailureCode ) and ( 0 < Len( g_strQueryStringServerOp ) ) and ( not IsEmpty( g_objServer ) ) then %> <script language="Javascript"> <!-- <% if ( 0 = Len( g_strQueryStringServerOp ) ) then %> window.alert( "<%= RemoveDangerousCharacters( L_CONNECTIONFAILURE_TEXT ) %>" ); <% else %> UseSingleFrame(); <% end if %> --> </script> <% end if %> <% end if %> </html> <% Session( "ConnectionFailure" ) = FALSE Session( "TransferFromAdmin" ) = FALSE on error resume next WMSServerHashASPCleanup WMSConnectASPCleanup %>